home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
VideoToolbox 96.06.15
/
VideoToolboxSources
/
PupilMTF.c
< prev
next >
Wrap
Text File
|
1995-07-19
|
720b
|
24 lines
/*
PupilMTF.c
Returns the MTF of a circular pupil of specified diameter at a specified spatial frequency,
for incoherent light of a specified wavelength. The answer is exact.
Based on:
Goodman, J. W. (1968) Introduction to Fourier Optics. San Francisco: McGraw-Hill,
page 120, Eq. 6-31.
HISTORY:
7/6/94 dgp wrote it, again.
*/
#include "VideoToolbox.h"
double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm);
double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm)
{
register double cPerDegMax,f,mtf;
cPerDegMax=(PI/180.)*diameterMm*1e-3/(wavelengthNm*1e-9); /* cycles/degree */
f=fabs(cPerDeg)/cPerDegMax;
if(f>=1.)mtf=0.;
else mtf=(2./PI)*(acos(f)-f*sqrt(1-f*f));
return mtf;
}